package com.gis.halodepok;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Feedback extends Activity {
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.feedback);
	}
        
       
		
        public void sendFeedback(View button) { 
        	final EditText nameField = (EditText) findViewById(R.id.EditTextName);
        	String name = nameField.getText().toString();
        	final EditText feedbackField = (EditText) findViewById(R.id.EditTextFeedbackBody);
        	String feedback = feedbackField.getText().toString();
        	
        	final Intent intent = new Intent(android.content.Intent.ACTION_SEND);
        	intent.setType("text/html");
            intent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ getString(R.string.mail_feedback_email) });
            intent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.mail_feedback_subject));            
            intent.putExtra(android.content.Intent.EXTRA_TEXT, name + "\n\n" + feedback);
            startActivity(Intent.createChooser(intent, getString(R.string.feedbacktitle))
            		
            		);
        	
        }
       
        
		
		
	}
